package com.pengke.pangu.global;


import com.pengke.pangu.common.enums.ResultCode;
import lombok.Getter;

@Getter
public class BizException extends RuntimeException{

    private final Integer code;

    public BizException(ResultCode resultCode){
        super(resultCode.getMsg());
        this.code= resultCode.getCode();
    }

    public BizException(ResultCode resultCode, String msg){
        super(msg);
        this.code= resultCode.getCode();
    }

}
